<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2021/8/1
 * Time: 12:49
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\common\model\mysql;

class SpecsValue extends BaseModel
{
    /**
     * @param int $specs_id
     * @param string $field
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getBySpecsId(int $specs_id = 0, string $field = '*')
    {
        return $this->field($field)
            ->where('specs_id', $specs_id)

            ->select()
            ->toArray();
    }
}